
import 'life_cirlce_pic_detail_entity.dart';

lifeCirclePicDetailEntityFromJson(LifeCirclePicDetailEntity data, Map<String, dynamic> json) {
	if (json['_id'] != null) {
		data.id = json['_id'];
	}
	if (json['account_id'] != null) {
		data.account_id = json['account_id'].toString();
	}
	if (json['avatar'] != null) {
		data.avatar = json['avatar'].toString();
	}
	if (json['nickname'] != null) {
		data.nickname = json['nickname'].toString();
	}
	if (json['release_time'] != null) {
		data.release_time = json['release_time'].toString();
	}
	if (json['img_video'] != null) {
		data.imgVideo = (json['img_video'] as List).map((v) => LifeCirclePicDetailDataImgVideo().fromJson(v)).toList();
	}
	if (json['status'] != null) {
		data.status = json['status'] is String
				? int.tryParse(json['status'])
				: json['status'].toInt();
	}
	if (json['share'] != null) {
		data.share = json['share'].toString();
	}
	if (json['title'] != null) {
		data.title = json['title'].toString();
	}
		if (json['topic'] != null) {
  	data.topic = LifeCircleHomeDataTopic().fromJson(json['topic']);
	}
	if (json['content'] != null) {
		data.content = json['content'].toString();
	}
	if (json['fabulous_count'] != null) {
		data.status = json['fabulous_count'] is String
				? int.tryParse(json['fabulous_count'])
				: json['fabulous_count'].toInt();
	}
	if (json['collection_count'] != null) {
		data.status = json['collection_count'] is String
				? int.tryParse(json['collection_count'])
				: json['collection_count'].toInt();
	}
	if (json['comment_count'] != null) {
		data.status = json['comment_count'] is String
				? int.tryParse(json['comment_count'])
				: json['comment_count'].toInt();
	}
	if (json['is_collection'] != null) {
		data.is_collection = json['is_collection'];
	}
	if (json['is_thumbsUp'] != null) {
		data.is_thumbsUp = json['is_thumbsUp'];
	}
	if (json['display_plead'] != null) {
		data.display_plead = json['display_plead'];
	}
	if (json['follow_status'] != null) {
		data.follow_status = json['follow_status'];
	}
	return data;
}

lifeCirclePicDetailDataImgVideoFromJson(LifeCirclePicDetailDataImgVideo data, Map<String, dynamic> json) {
	if (json['status'] != null) {
		data.status = json['status'].toString();
	}
	if (json['width'] != null) {
		data.width = json['width'] is String
				? double.tryParse(json['width'])
				: json['width'].toDouble();
	}
	if (json['height'] != null) {
		data.height = json['height'] is String
				? double.tryParse(json['height'])
				: json['height'].toDouble();
	}
	if (json['url'] != null) {
		data.url = json['url'].toString();
	}
	if (json['type'] != null) {
		data.type = json['type'].toString();
	}
	if (json['path'] != null) {
		data.path = json['path'].toString();
	}
	if (json['thumbPath'] != null) {
		data.thumbPath = json['thumbPath'].toString();
	}
	if (json['coverPic'] != null) {
		data.coverPic = json['coverPic'].toString();
	}
	if (json['endFrameUrl'] != null) {
		data.endFrameUrl = json['endFrameUrl'].toString();
	}
	if (json['completeUrl'] != null) {
		data.completeUrl = json['completeUrl'].toString();
	}
	if (json['thumbnail'] != null) {
		data.thumbnail = json['thumbnail'].toString();
	}
	if(json['completeStandUrl'] != null){
		data.completeStandUrl = json['completeStandUrl'].toString();
	}
	return data;
}

Map<String, dynamic> lifeCirclePicDetailDataImgVideoToJson(LifeCirclePicDetailDataImgVideo entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['status'] = entity.status;
	data['width'] = entity.width;
	data['height'] = entity.height;
	data['url'] = entity.url;
	data['type'] = entity.type;
	data['path'] = entity.path;
	data['thumbPath'] = entity.thumbPath;
	data['coverPic'] = entity.coverPic;
	data['endFrameUrl'] = entity.endFrameUrl;
	data['completeUrl'] = entity.completeUrl;
	data['thumbnail'] = entity.thumbnail;
	return data;
}

lifeCirclePicDetailDataImgTopicFromJson(LifeCircleHomeDataTopic data, Map<String, dynamic> json) {
	if (json['_id'] != null) {
		data.id = json['_id'];
	}
	if (json['title'] != null) {
		data.title = json['title'];
	}
	return data;
}